1
2 import java.sql.Connection;
3 import java.sql.DriverManager;
4 import java.sql.ResultSet;
5 import java.sql.Statement;
6 import java.text.SimpleDateFormat;
7 import java.util.Date;
8
9
10 /*
11 * To change this license header, choose License Headers in Project Properties.
12 * To change this template file, choose Tools | Templates
13 * and open the template in the editor.
14 */
15
16 /**
17 *
18 * @author MY LAPI
19 */
20
21
22
23 public class AdminDesh extends javax.swing.JFrame {
24
25 /**
26 * Creates new form UserDesh
27 */
28 public AdminDesh() {
29 initComponents();
30
31 SimpleDateFormat formatter = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
32 Date date = new Date();
33 jLabel4.setText(formatter.format(date));
34
35 }
36
37 /**
38 * This method is called from within the constructor to initialize the form.
39 * WARNING: Do NOT modify this code. The content of this method is always
40 * regenerated by the Form Editor.
41 */
42 @SuppressWarnings("unchecked")
43 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
44 private void initComponents() {
45
46 jPanel1 = new javax.swing.JPanel();
47 jLabel1 = new javax.swing.JLabel();
48 jButton1 = new javax.swing.JButton();
49 jButton2 = new javax.swing.JButton();
50 jButton3 = new javax.swing.JButton();
51 jLabel4 = new javax.swing.JLabel();
52 jButton4 = new javax.swing.JButton();
53 jButton7 = new javax.swing.JButton();
54 jButton8 = new javax.swing.JButton();
55 jButton9 = new javax.swing.JButton();
56
57 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
58
59 jPanel1.setBackground(new java.awt.Color(204, 255, 204));
60
61 jLabel1.setFont(new java.awt.Font("Arial Unicode MS", 0, 24)); // NOI18N
62 jLabel1.setText("STAR BANK Admin Panel");
63
64 javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
65 jPanel1.setLayout(jPanel1Layout);
66 jPanel1Layout.setHorizontalGroup(
67 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
68 .addGroup(jPanel1Layout.createSequentialGroup()
69 .addGap(88, 88, 88)
70 .addComponent(jLabel1)
71 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
72 );
73 jPanel1Layout.setVerticalGroup(
74 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
75 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
76 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
77 .addComponent(jLabel1)
78 .addContainerGap())
79 );
80
81 jButton1.setText("LogOut");
82 jButton1.addActionListener(new java.awt.event.ActionListener() {
83 public void actionPerformed(java.awt.event.ActionEvent evt) {
84 jButton1ActionPerformed(evt);
85 }
86 });
87
88 jButton2.setText("New User Registration");
89 jButton2.addActionListener(new java.awt.event.ActionListener() {
90 public void actionPerformed(java.awt.event.ActionEvent evt) {
91 jButton2ActionPerformed(evt);
92 }
93 });
94
95 jButton3.setText("Transition History");
96
97 jLabel4.setFont(new java.awt.Font("Arial Unicode MS", 0, 16)); // NOI18N
98
99 jButton4.setText("Transition");
100
101 jButton7.setText("Requests");
102 jButton7.addActionListener(new java.awt.event.ActionListener() {
103 public void actionPerformed(java.awt.event.ActionEvent evt) {
104 jButton7ActionPerformed(evt);
105 }
106 });
107
108 jButton8.setText("Services");
109
110 jButton9.setText("Quick Transfer");
111
112 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
113 getContentPane().setLayout(layout);
114 layout.setHorizontalGroup(
115 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
116 .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
117 .addGroup(layout.createSequentialGroup()
118 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
119 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
120 .addContainerGap()
121 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
122 .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, 146, Short.MAX_VALUE)
123 .addComponent(jButton7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
124 .addGap(10, 10, 10)
125 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
126 .addGroup(layout.createSequentialGroup()
127 .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
128 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
129 .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE))
130 .addGroup(layout.createSequentialGroup()
131 .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
132 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
133 .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE))))
134 .addGroup(layout.createSequentialGroup()
135 .addGap(124, 124, 124)
136 .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)
137 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
138 .addComponent(jButton1)
139 .addGap(17, 17, 17)))
140 .addContainerGap())
141 );
142 layout.setVerticalGroup(
143 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
144 .addGroup(layout.createSequentialGroup()
145 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
146 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
147 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
148 .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 21, javax.swing.GroupLayout.PREFERRED_SIZE)
149 .addComponent(jButton1))
150 .addGap(30, 30, 30)
151 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
152 .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
153 .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
154 .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))
155 .addGap(18, 18, 18)
156 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
157 .addComponent(jButton8, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
158 .addComponent(jButton9, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
159 .addComponent(jButton7, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE))
160 .addContainerGap(19, Short.MAX_VALUE))
161 );
162
163 pack();
164 }// </editor-fold>//GEN-END:initComponents
165
166 private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
167 System.exit(0);
168 }//GEN-LAST:event_jButton1ActionPerformed
169
170 private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
171 AdminDesh pb1=new AdminDesh();
172 NewUserReg pb2=new NewUserReg();
173 pb1.setVisible(false);
174 pb2.setVisible(true);
175 dispose();
176 }//GEN-LAST:event_jButton2ActionPerformed
177
178 private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
179 // TODO add your handling code here:
180 }//GEN-LAST:event_jButton7ActionPerformed
181
182 /**
183 * @param args the command line arguments
184 */
185 public static void main(String args[]) {
186 /* Set the Nimbus look and feel */
187 //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
188 /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
189 * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
190 */
191 try {
192 for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
193 if ("Nimbus".equals(info.getName())) {
194 javax.swing.UIManager.setLookAndFeel(info.getClassName());
195 break;
196 }
197 }
198 } catch (ClassNotFoundException ex) {
199 java.util.logging.Logger.getLogger(UserDesh.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
200 } catch (InstantiationException ex) {
201 java.util.logging.Logger.getLogger(UserDesh.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
202 } catch (IllegalAccessException ex) {
203 java.util.logging.Logger.getLogger(UserDesh.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
204 } catch (javax.swing.UnsupportedLookAndFeelException ex) {
205 java.util.logging.Logger.getLogger(UserDesh.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
206 }
207 //</editor-fold>
208
209 /* Create and display the form */
210 java.awt.EventQueue.invokeLater(new Runnable() {
211 public void run() {
212 new AdminDesh().setVisible(true);
213
214
215 }
216 });
217 }
218
219 // Variables declaration - do not modify//GEN-BEGIN:variables
220 private javax.swing.JButton jButton1;
221 private javax.swing.JButton jButton2;
222 private javax.swing.JButton jButton3;
223 private javax.swing.JButton jButton4;
224 private javax.swing.JButton jButton7;
225 private javax.swing.JButton jButton8;
226 private javax.swing.JButton jButton9;
227 private javax.swing.JLabel jLabel1;
228 private javax.swing.JLabel jLabel4;
229 private javax.swing.JPanel jPanel1;
230 // End of variables declaration//GEN-END:variables
231 }